Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tsx): add MergeUnion util to automatically inferred Props #881

Merged
merged 2 commits into from
Nov 2, 2023

Conversation

natemoo-re
Copy link
Member

Changes

  • Automatically inferred Props has shipped!
  • There was an edge case with union Props where they couldn't be destructured.
  • This PR adds a MergeUnion utility to flatten unions into each other so that divergent props don't need to be manually discriminated before destructuring.

Testing

Test updated, type util manually tested

Docs

Bug fix only

@changeset-bot
Copy link

changeset-bot bot commented Oct 30, 2023

🦋 Changeset detected

Latest commit: 4e63f09

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/compiler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

.changeset/large-geese-kick.md Outdated Show resolved Hide resolved
Co-authored-by: Emanuele Stoppa <[email protected]>
@Princesseuh Princesseuh merged commit bf76663 into main Nov 2, 2023
5 checks passed
@Princesseuh Princesseuh deleted the fix/tsx-union-prop branch November 2, 2023 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants